import requests

IPADDRESS = "localhost" #Replace this with the correct IP address
UNSTRUCTURED_DATA_PORT = "8086"
url = f'http://{IPADDRESS}:{UNSTRUCTURED_DATA_PORT}/documents'
# Open the file in binary mode and send it in a POST request
filename = "../data/FAQ.pdf"
with open(filename, 'rb') as file:
    files = {'file': file}
    response = requests.post(url, files=files)

# Print the response from the server
print(f'Uploaded {filename}: {response.status_code}')
print(response.json())